﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DimDocTemplateList.aspx.cs" Inherits="DExcelServiceApp.DimDocTemplateList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <table style="width: 100%">
        <tr>
            <td valign="top" style="width: 150px;">
                <a href="BOrgList.aspx">Org List</a><br />
                <a href="BDomainList.aspx">Domain List</a><br />
                <a href="BYearList.aspx">Year List</a><br />
                <a href="DimDataList.aspx">Dim Data List</a><br />
                <a href="DimDocTemplateList.aspx">Doc Tempalte List</a><br />
                <a href="DocList.aspx">Doc List</a>
            </td>
            <td valign="top" style="width: 30%;">
                <div>
                    <div>
                        Code<asp:TextBox ID="_ctlEditCode" runat="server"></asp:TextBox>
                    </div>
                    <div>
                        Name<asp:TextBox ID="_ctlEditName" runat="server"></asp:TextBox>
                    </div>
                    <asp:Button ID="_ctlBtnCreateDoc" runat="server" Text="create doc" 
                        onclick="_ctlBtnCreateDoc_Click" />
                </div>
                <asp:GridView ID="_ctlGridDoc" runat="server" Width="100%" DataKeyNames="Id" 
                    onselectedindexchanged="_ctlGridDoc_SelectedIndexChanged">
                    <Columns>
                        <asp:ButtonField CommandName="Select" Text="按钮" />
                    </Columns>
                </asp:GridView>
            </td>
            <td valign="top">
                <div>
                    <asp:LinkButton ID="_ctlBtnPreview" runat="server" 
                        onclick="_ctlBtnPreview_Click">preview</asp:LinkButton>
                    <asp:HyperLink ID="_ctlLinkTemplateList" runat="server" Target="_blank">TemplateList</asp:HyperLink>
                </div>
                <h2>all dims</h2>
                <asp:Repeater ID="_ctlGridDims" runat="server" onitemcommand="_ctlGridDims_ItemCommand">
                    <HeaderTemplate>
                    <table style="width:100%;">
                        <tr>
                        <th>
                            -
                        </th>
                            <th>
                                Name(Code)
                            </th>
                        </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <asp:LinkButton ID="_ctlBtnAssignY" CommandName="AssignY" CommandArgument='<%#Eval("Id") %>' runat="server" Text="assign-y"/>
                                <asp:LinkButton ID="_ctlBtnAssignX" CommandName="AssignX" CommandArgument='<%#Eval("Id") %>' runat="server" Text="assign-x"/>
                            </td>
                            <td>
                                <%# Eval("Name") %>(<%# Eval("Code") %>)
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                    </table>
                    </FooterTemplate>
                </asp:Repeater>
                <div>
                    <h2>assigned dims</h2>
                </div>
                <h3>y-dims</h3>
                <asp:Repeater ID="_ctlListAssignedYDims" runat="server" 
                    onitemcommand="_ctlListAssignedYDims_ItemCommand">
                    <HeaderTemplate>
                    <table style="width:100%;">
                        <tr>
                        <th>
                            -
                        </th>
                            <th>
                                Index
                            </th>
                            <th>
                                Name(code)
                            </th>
                            <th>
                                Direction
                            </th>
                            <th>
                                Dir-Index
                            </th>
                        </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <asp:LinkButton ID="_ctlBtnUp" CommandName="Up" CommandArgument='<%#Eval("Id") %>' runat="server" Text="up"/>
                                <asp:LinkButton ID="_ctlBtnDown" CommandName="Down" CommandArgument='<%#Eval("Id") %>' runat="server" Text="down"/>
                                <asp:LinkButton ID="_ctlBtnSetX" CommandName="SetX" CommandArgument='<%#Eval("Id") %>' runat="server" Text="set-x"/>
                                <asp:LinkButton ID="_ctlBtnSetPD" CommandName="SetPD" CommandArgument='<%#Eval("Id") %>' runat="server" Text="set-pd"/>
                            </td>
                            <td>
                                <%# Eval("Index") %>
                            </td>
                            <td>
                                <%# Eval("DimName") %>(<%# Eval("DimCode") %>)
                            </td>
                            <td>
                                <%# Eval("Direction") %>
                            </td>
                            <td>
                                <%# Eval("DirIndex") %>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                    </table>
                    </FooterTemplate>
                </asp:Repeater>
                <h3>x-dims</h3>
                <asp:Repeater ID="_ctlListAssignedXDims" runat="server" 
                    onitemcommand="_ctlListAssignedXDims_ItemCommand">
                    <HeaderTemplate>
                    <table style="width:100%;">
                        <tr>
                        <th>
                            -
                        </th>
                            <th>
                                Index
                            </th>
                            <th>
                                Name(Code)
                            </th>
                            <th>
                                Direction
                            </th>
                            <th>
                                Dir-Index
                            </th>
                        </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <asp:LinkButton ID="_ctlBtnUp" CommandName="Up" CommandArgument='<%#Eval("Id") %>' runat="server" Text="up"/>
                                <asp:LinkButton ID="_ctlBtnDown" CommandName="Down" CommandArgument='<%#Eval("Id") %>' runat="server" Text="down"/>
                                <asp:LinkButton ID="_ctlBtnSetY" CommandName="SetY" CommandArgument='<%#Eval("Id") %>' runat="server" Text="set-y"/>
                                <asp:LinkButton ID="_ctlBtnSetPD" CommandName="SetPD" CommandArgument='<%#Eval("Id") %>' runat="server" Text="set-pd"/>
                            </td>
                            <td>
                                <%# Eval("Index") %>
                            </td>
                            <td>
                                <%# Eval("DimName") %>(<%# Eval("DimCode") %>)
                            </td>
                            <td>
                                <%# Eval("Direction") %>
                            </td>
                            <td>
                                <%# Eval("DirIndex") %>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                    </table>
                    </FooterTemplate>
                </asp:Repeater>
                <h3>page-dims</h3>
                <asp:Repeater ID="_ctlListPageDims" runat="server" 
                    onitemcommand="_ctlListAssignedPageDims_ItemCommand">
                    <HeaderTemplate>
                    <table style="width:100%;">
                        <tr>
                        <th>
                            -
                        </th>
                            <th>
                                Index
                            </th>
                            <th>
                                Name(Code)
                            </th>
                            <th>
                                Direction
                            </th>
                            <th>
                                Dir-Index
                            </th>
                        </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <asp:LinkButton ID="_ctlBtnSetPD" CommandName="Clear" CommandArgument='<%#Eval("Id") %>' runat="server" Text="clear"/>
                            </td>
                            <td>
                                <%# Eval("Index") %>
                            </td>
                            <td>
                                <%# Eval("DimName") %>(<%# Eval("DimCode") %>)
                            </td>
                            <td>
                                <%# Eval("Direction") %>
                            </td>
                            <td>
                                <%# Eval("DirIndex") %>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                    </table>
                    </FooterTemplate>
                </asp:Repeater>
            </td>
        </tr>
    </table>
    <div>
        <asp:HiddenField ID="_ctlHiddenDocId" runat="server" />
    </div>
    </form>
</body>
</html>
